[Appservice] Fix #31394: az functionapp deployment source config-zip: Never ending loop on flex function app health check#33388
Conversation
Adds missing tries count Breaks out if IP restriction in place
️✔️AzureCLI-FullTest
|
️✔️AzureCLI-BreakingChangeTest
|
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
az functionapp deployment source config-zip: never ending loop on flex function app health check
There was a problem hiding this comment.
Pull request overview
Fixes a hang in the App Service module’s post-deployment health check for Flex Function Apps invoked by az functionapp deployment source config-zip, by ensuring the retry loop terminates and by short-circuiting when the health check is blocked by IP restrictions.
Changes:
- Increment
num_trialsfor non-2xx health-check responses to prevent an infinite retry loop. - Exit the health-check loop early when a 403 response indicates IP-based access restriction.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
az functionapp deployment source config-zip: never ending loop on flex function app health checkaz functionapp deployment source config-zip: Never ending loop on flex function app health check
|
/azp run |
|
Commenter does not have sufficient privileges for PR 33388 in repo Azure/azure-cli |
517b44e to
915b9cc
Compare
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Related command
az functionapp deployment source config-zip
Description
The
check_flex_app_after_deploymentfunction called after a deployment had a never ending re-try loop for non-2xx response status codes. This PR adds the missingnum_trialsincrement. It also breaks out of the health check when an IP restriction is found preventing the client from calling the health check.Fixes #31394
Testing Guide
An existing function app with a default network rule of Deny has no access from the client to the app. Run the deployment command:
az functionapp deployment source config-zip \ --resource-group MyResourceGroup \ --name MyUniqueAppName \ --src funcapp.zipBefore it would hang forever, but now transient errors are handled and retries are done up the the limit. An IP restriction will complete successfully with a message saying the health check was not possible
This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.